package com.woniuxy.finance.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Author: XiaoYiWang
 * @Date: 14:47 2022/6/8
 * @Description:交易实体类
 **/

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "交易")
public class Deal {
    private int id;
    @ApiModelProperty(value = "交易流水号")
    private String dealSerialNumber;        //交易流水号
    @ApiModelProperty(value = "交易用户名")
    private String username;
    @ApiModelProperty(value = "交易金额")
    private BigDecimal transactionAmount;
    @ApiModelProperty(value = "交易来源")
    private String source;
    @ApiModelProperty(value = "支付方式")
    private String paymentMethod;
    @ApiModelProperty(value = "交易状态")
    private String transactionStatus;
    @ApiModelProperty(value = "交易时间")
    private Date tradingTime;
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "创建人id")
    private int createUserId;
    @ApiModelProperty(value = "最后修改时间")
    private Date lastModifiedTime;
    @ApiModelProperty(value = "最后修改人id")
    private int lastUserId;
    @ApiModelProperty(value = "是否删除")
    private Integer isDelete;
    @ApiModelProperty(value = "销售总额")
    public static BigDecimal sumOfDeal;
    @ApiModelProperty(value = "有效订单数")
    public static int numOfDeal;
    @ApiModelProperty(value = "有效订单总额")
    public static BigDecimal sumOfEffectDeal;
}
